<?
	if(isset($_GET['page']) and is_numeric($_GET['page']))
		$_SESSION[$sess]['page'] = $_GET['page'];
	else
		$_SESSION[$sess]['page'] = 1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<!-- Meta -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link id="page_favicon" href="favicon.ico" rel="icon" type="image/x-icon" />
		<!-- End of Meta -->
		
		<!-- Page title -->
		<title><?=_SITE_NAME?></title>
		<!-- End of Page title -->
		
		<!-- Libraries -->
		<? include_once "css.php"; ?>
		<? include_once "js.php"; ?>
		<!-- End of Libraries -->	
	</head>
	<body>
		<!-- Container -->
		<div id="container">
			<!-- Header -->
			<div id="header">
				<!-- Top -->
				<div id="top">
					<!-- Logo -->
					<div class="logo"> 
						<a href="?" title="<?_SITE_NAME?> Yönetim Anasayfa" class=""><img src="assets/logo.png" alt="<?=_SITE_NAME?> Yönetim Paneli" /></a> 
					</div>
					<!-- End of Logo -->
					
					<!-- Meta information -->
					<div class="meta">
						<p>Hoşgeldin, <?=$_SESSION[$sess]['user']['name']?> <!-- <a href="#" title="1 new private message from Elaine!" class="">1 new message!</a> --></p>
						<ul>
							<li><a href="?logout.action" title="Güvenli çıkış"><span class="ui-icon ui-icon-power"></span>Çıkış</a></li>
							<li><a href="?settings.changePassword" title="Ayarları değiştir" class=""><span class="ui-icon ui-icon-wrench"></span>Ayarlar</a></li>
							<li><a href="../" title="Site Canlı" class="" target="previewX"><span class="ui-icon ui-icon-search"></span>Site Canlı</a></li>
						</ul>	
					</div>
					<!-- End of Meta information -->
				</div>
				<!-- End of Top-->
			
				<!-- The navigation bar -->
				<div id="navbar">
					<ul class="nav">
						<li><a href="?">Anasayfa</a></li>
						<? if(is_dir("modules/homeSliders")){?><li><a href="?homeSliders.list">Banner</a></li><?}?>
						<? if(is_dir("modules/announcements")){?><li><a href="?announcements.list">Duyurular</a></li><?}?>
						<? if(is_dir("modules/projects")){?><li><a href="?projects.list">Projeler</a></li><?}?>
						<? if(is_dir("modules/products")){?><li><a href="?products.list">Ürünler</a></li><?}?>
						<? if(is_dir("modules/news")){?><li><a href="?news.list">Haberler</a></li><?}?>
						<? if(is_dir("modules/gallery")){?><li><a href="?gallery.list">Galeri</a></li><?}?>
						<? if(is_dir("modules/peoples")){?><li><a href="?peoples.list">Kişiler</a></li><?}?>
					</ul>
				</div>			
			</div>
			<!-- End of Header -->
			
			<!-- Background wrapper -->
			<div id="bgwrap">
		
				<!-- Main Content -->
				<div id="content">
					<div id="main">
						<?php
						global $moduleName, $moduleEvent, $sess, $_SESSION;
							switch($moduleName)
							{								
								case "announcements":
									loadPages($moduleName, $moduleEvent);
								break;
								
								case "settings":
									loadPages($moduleName, $moduleEvent);
								break;
								
								case "announcements":
									loadPages($moduleName, $moduleEvent);
								break;

								case "products":
									loadPages($moduleName, $moduleEvent);
								break;
								
								default:
									loadPages($moduleName, $moduleEvent);
								break;
							}
						?>		
						
					</div>
				</div>
				<!-- End of Main Content -->
				
				<!-- Sidebar -->
				<div id="sidebar">
					<?php
						loadPages($moduleName , 'subMenu');
					?>
				</div>
				<!-- End of Sidebar -->
				
			</div>
			<!-- End of bgwrap -->
		</div>
		<!-- End of Container -->
		
		<!-- Footer -->
		<div id="footer">
			<p class="mid">
				<!-- Change this to your own once purchased -->
				&copy; <?=_SITE_NAME?> Yönetim Paneli 2012. Tüm hakları saklıdır.
				<!-- -->
			</p>
		</div>
		<!-- End of Footer -->
		<?
			if(empty($parGet[0]))
			{
			?>
			<style>
				#sidebar {	display:none;		}
				#main 	{	margin-left:30px;	}
				#content {	background:#fff;	}
			</style>
			<?
			}
		?>
	</body>
</html>